
<html>
<body>
<div id="container">
	<%@ include file="/WEB-INF/page/common/header.jsp" %>
	<div id="navigator">
 		<a href="<c:url value="/common/home.o"/>"><fmt:message key="label.common.home" /></a> > 
 		<fmt:message key="label.client.model" />
 		<%@ include file="/WEB-INF/page/common/navigator.jsp" %>
    </div>
    <div id="midbody">
    	<div id="leftside">
	     	<br>
		 	<a href="<c:url value="/client/query.o"/>"><fmt:message key="label.client.action.listall" /></a>
		 	<br><br>
		 	<shiro:hasPermission name="client:create">
		 	<a href="javascript:onCreate();"><fmt:message key="label.client.action.create" /></a>
		 	<br><br>
		 	</shiro:hasPermission>
    	</div>
    	<div id="rightside">
    		<div id="bigbox">
			    <div class="title clearfix">
			    	<div style="float: left">
			    		<fmt:message key="label.client.title" />
			    	</div>
			    	<%@ include file="/WEB-INF/page/common/hidemenu.jsp" %>
		    	</div>
		    	<div class="content">
		    		<form:form modelAttribute="searchClientCommand">
		        	<form:errors path="*" element="div" cssClass="errors"/>
	    			<table id="searchTable">
	    				<% out.print(request.getAttribute("clientSearchTable")); %>
	    			</table>
	    			</form:form>
		    		<table id="queryTable">
		    			<% out.print(request.getAttribute("clientQueryTable")); %>
		    		</table>
					<br>
					<% com.octopus.kernal.controller.AbstractSearchCommand command = (com.octopus.kernal.controller.AbstractSearchCommand)request.getAttribute("searchCommand"); %>
					<pg:pager url="query.o" items="<%= command.getTotalNumber()%>" 
						export="currentPageNumber=pageNumber" maxIndexPages="<%= command.getMaxIndexPages()%>" maxPageItems="<%= command.getMaxPageItems()%>">  
					    <pg:first>  
					        <a href="<c:out value="${pageUrl}" />">[<fmt:message key="label.common.first" />]</a>  
					    </pg:first>  
					    <pg:prev>  
					        <a href="<c:out value="${pageUrl}" />">[<fmt:message key="label.common.previous" />]</a>  
					    </pg:prev>  
					    <pg:pages>  
					        <c:choose>  
					            <c:when test="${currentPageNumber eq pageNumber}">  
					                <font color="red">[<c:out value="${pageNumber}" />]</font>  
					            </c:when>  
					            <c:otherwise>  
					                <a href="<c:out value="${pageUrl}" />">[<c:out value="${pageNumber}" />]</a>  
					            </c:otherwise>  
					        </c:choose>  
					    </pg:pages>  
					    <pg:next>  
					        <a href="<c:out value="${pageUrl}" />">[<fmt:message key="label.common.next" />]</a>  
					    </pg:next>  
					    <pg:last>  
					        <a href="<c:out value="${pageUrl}" />">[<fmt:message key="label.common.last" />]</a>  
					        -
					        [<fmt:message key="Total" />:<%= null==command?0:command.getTotalNumber()%>]
					    </pg:last>  
				    </pg:pager>
		    	</div>
    		</div>
    	</div>
    </div>
	<%@ include file="/WEB-INF/page/common/foot.jsp" %>
</div>

</body>
</html>
